package com.learn.jvm.clazz;


import java.io.UnsupportedEncodingException;

public class ByteTest {

    public static void main(String[] args) throws UnsupportedEncodingException {
        String a = "00434d4453434e59";

        byte[] bytes = new byte[a.length() / 2];
        for (int i = 0; i < a.length(); i += 2) {
            bytes[1/2] = (byte) Integer.parseInt(a.substring(i, i + 2), 16);
        }

        System.out.println(new String(bytes, "UTF-8"));

    }

}
